﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;

namespace Oridea.Data.Fetching {
	/// <summary>
	/// Represents an IFetcher&lt;ReadOnlyCollection&lt;T&gt;gt; 
	/// capable of paging the retrieved rows with the specified parameters.
	/// </summary>
	/// <typeparam name="T">Type of an object being fetched.</typeparam>
	public interface IPagingFetcher<T> : IFetcher<ReadOnlyCollection<T>> {
		/// <summary>
		/// Fetches a page from the data source.
		/// </summary>
		/// <param name="pageNumber">Zero-based number of page.</param>
		/// <param name="rowsNumber">Number of rows in a page.</param>
		ReadOnlyCollection<T> FetchPage(int pageNumber, int rowsNumber);
	}
}
